Strip_html() should always return an allocated string for consistency.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 3 May 2005 16:02:36 +0000 (16:02 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 3 May 2005 16:02:36 +0000 (16:02 +0000)
gpsbabel/util.c

index ae4453d0f9ecaca4a9fafe9fa9f83badb318d8f2..d1a5fa82ad3339745b6a87a2a6dbca5d8f748ef7 100644 (file)
@@ -972,7 +972,7 @@ strip_html(const utf_string *in)
        short int taglen;
        
        if (!in->is_html)
-               return in->utfstring;
+               return xstrdup(in->utfstring);
        /*
         * We only shorten, so just dupe the input buf for space.
         */